Mouse Wheel Scrolling on gosu
π(0)π 2024-05-29 16:26:37 -0700
β²οΈπ 2024-05-29 16:28:13 -0700
βοΈ meta-game
π·οΈ[scroll wheel] [mouse] [gosu] [stinky] [stimky] [Be stinky] [stinky.zip] [stimky.zip] [meta-game] [game development] [#rubygem] [#rubygems] [#Rubylang] [indie game development]
(πͺ)
π₯οΈ...β¨οΈ
The way to detect the mouse scroll wheel in Gosu is as follows:
require 'gosu'
class MyGame < Gosu::Window
def initialize
super(800, 600)
# Your initialization code here
end
def button_down(id)
case id
when Gosu::MsWheelDown
puts "Scrolling down"
# Handle scrolling down logic here
when Gosu::MsWheelUp
puts "Scrolling up"
# Handle scrolling up logic here
else
super
end
end
def update
# Your update logic here
end
def draw
# Your drawing logic here
end
end
MyGame.new.show